package cn.hist.hfp.repository;

import cn.hist.hfp.entity.User;
import cn.hist.hfp.entity.UserValidation;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.Optional;

@Repository
public interface UserValidationRepository extends JpaRepository<UserValidation, Integer> {

    void deleteAllByUser(User user);

    Optional<UserValidation> findTopByUser(User user);
}
